package exception;

public class TryCatchDemo {
    public static void main(String[] args) {
        System.out.println("Hello World");
        try{
            String a = null;
            String b= "abc";
            System.out.println(b.charAt(6));
            System.out.println(a.length());
            System.out.println(Integer.parseInt(b));
        }catch (NullPointerException|StringIndexOutOfBoundsException e){
            System.out.println("NullPointerException");
            System.out.println("StringIndexOutOfBoundsException");
        }catch (NumberFormatException n){
            System.out.println("NumberFormatException");
        }
        System.out.println("000000000");

    }
}
